package com.tanovo.mapper;

import com.tanovo.bo.MenuQueryBo;
import com.tanovo.domain.Resources;
import com.tanovo.domain.ResourcesExample;
import com.tanovo.domain.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ResourcesMapper {
    int countByExample(ResourcesExample example);

    int deleteByExample(ResourcesExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Resources record);

    int insertSelective(Resources record);

    List<Resources> selectByExample(ResourcesExample example);

    Resources selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Resources record, @Param("example") ResourcesExample example);

    int updateByExample(@Param("record") Resources record, @Param("example") ResourcesExample example);

    int updateByPrimaryKeySelective(Resources record);

    int updateByPrimaryKey(Resources record);

    List<Resources> getListByRole(Role role);

    List<Resources> getCurrentUserList(@Param("userId") Integer userId,@Param("clientId") String clientId);

    Integer hasChildren(@Param("id") Integer id);


    Integer getMaxId();


    List<Resources> getCurrentUserMenuList(MenuQueryBo queryBo);

    List<Resources> getAppAdminResources();


    List<Resources> getByParentId(Integer parentId, String clientId,Integer userId);

    List<Resources> getAppResourceByParentId(int parentId, String clientId, Integer userId);
}